// JavaScript Document
function validate_requird(field,alerttext)
	{
		with(field)
		{
			if(value==null || value=="")
			{
				alert(alerttext)
				return false	
			}	
		}
		return true;	
	}
	function regIsEmail(fData) 
	{ 
		var reg = new RegExp("^[0-9a-zA-Z]+@[0-9a-zA-Z]+[\.]{1}[0-9a-zA-Z]+[\.]?[0-9a-zA-Z]+$"); 
		return reg.test(fData); 
	} 
	function regIsPhone(fData) 
	{ 
		var reg = /^(\+86)?(1[0-9]{10})$/; 
		return reg.test(fData); 
	} 
	
	function validate_username()
	{
		if(validate_required(username,"用户名不能为空")==false)
		{
			return false	
		}
		/*
		*
		*学了正则表达式再来整吧】
		*/
		return true;	
	}
	function validate_form(thisform)
	{
		return false;
	}
	function checkPassWord() 
		{    
		  var passWord = document.getElementById("password").value;      
		  var passWordO = /^[a-zA-Z0-9]*[^a-zA-Z0-9]+[a-zA-Z0-9]*$/;      
		  if(passWord.search(passWordO) == -1)      
		  {          
				alert("您输入的密码格式不正确，请重新输入！");          
				return false;      
		  }      
		  if(document.getElementById("password").length <= 8)     
		  {          
				alert("您输入的密码小于8位，请输入大于8位的密码！");          
				return false;      
		  }      
				return true;        
		}  
		function checkEmail()  
		{      
			var email = document.getElementById("email").value;      
			var emailO = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;      
			if(email.search(emailO) == -1)      
			{          
				alert("您输入的邮件地址不正确，请重新输入！");          
				return false;      
			}      
			return true;  
		}  
		function checkBirthday()  {     
			var birthday = document.getElementById("birthday").value;      
			var birthdayO = /^\d{4}-\d{2}-\d{2}$/;      
			if(birthday.search(birthdayO) == -1)      
			{          
				alert("您输入的出生年月日有误，请重新输入！");          
				return false;      
			}      
			return true;  
		}  
		function checkPostcode()  
		{      
			var postcode = document.getElementById("postcode").value;      
			var postcodeO = /^\d{6}$/;      
			if(postcode.search(postcodeO) == -1)      
			{          
				alert("请输入正确的邮编！");          
				return false;      
			}      
			return true;  
		}